package com.gxa.service.employee.impl;

import com.gxa.common.R.ResponseData;
import com.gxa.mapper.employee.SelectBoxMapper;
import com.gxa.pojo.BianLiang;
import com.gxa.pojo.Dept;
import com.gxa.pojo.DeptSelectBox;
import com.gxa.service.employee.SelectBoxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SelectBoxServiceImpl implements SelectBoxService {

    /**
     * 七个下拉多选框
     * @return
     */
    @Autowired(required = false)
    private SelectBoxMapper selectBoxMapper;
    @Override
    public ResponseData selectBox() {
        ResponseData responseData = new ResponseData();
        List<BianLiang> bianLiangList = selectBoxMapper.selectBox();
        responseData.setCode(200);
        responseData.setMsg("success");
        responseData.setData(bianLiangList);
        return responseData;
    }

    /**
     * 所在部门下拉多选框
     * @return
     */
    @Override
    public ResponseData selectAllDepartment() {
        ResponseData responseData = new ResponseData();
       List<DeptSelectBox> selectDeptNameBoxList = selectBoxMapper.selectDeptNameBox();
        responseData.setCode(200);
        responseData.setMsg("success");
        responseData.setData(selectDeptNameBoxList);
        return responseData;
    }
}
